<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${request.getContextPath()}/bb214072/Report_072"
          method="post" name="pagerForm">
        <div class="bjui-searchBar">
            <g:hiddenField name="SYS_QUERY_NAME" value="Report_072"/>
            <g:hiddenField name="EXPORT_CONTENT_NAME" value="Report_072Excel"/>
            <input type="hidden" name="tableInfo" id="tttableInfo" value=""/>
            <label>产品名称：</label>
            <g:select name="name" from="${partList}" data-toggle="selectpicker" data-live-search="true"
                      onpropertychange="abc(this)"
                      optionKey="name" optionValue="name" value="${name}" data-size="12" data-width="200"
                      noSelection="['': '']" id="prod"/>&nbsp;
            <label>流程名称：</label>
            <g:select name="processName" from="${processList}" data-toggle="selectpicker" data-live-search="true"
                      id="process" optionKey="processName" optionValue="processName" value="${processName}"
                      data-size="12"
                      data-width="200" noSelection="['': '']"/>&nbsp;
            <button type="submit" class="btn-default" data-icon="search" id="submit1">查询</button>&nbsp;

        %{--<button type="button" class="btn-blue" onclick="javascript:bjuiExportExl('#pagerForm', '${request.getContextPath()}/bb214072/exportExce')" data-icon="file-excel-o"--}%
        %{--title="导出Excel">导出</button>&nbsp;--}%

        %{--<button type="button" class="btn-blue" onclick="javascript:exportTable2Excel('#data')"--}%
        %{--data-icon="file-excel-o">导出</button>&nbsp;--}%

            <button id="btn" type="button" class="btn btn-green" data-confirm-msg="确定要导出吗？"
                    data-icon="sign-out">导出</button>

        </div>
    </form>
</div>

<div class="bjui-pageContent tableContent prodFlow11" id="data">
    <div class="table-responsive prodExcel" data-tableName="Test Table 1">
    <g:if test="${Report_072List.size() > 0}">
    %{--<g:render template="exportReport_072Excel"></g:render>--}%
        <table class="table table-bordered table-hover table-striped table-top"  data-width="100%" data-nowrap="true"
              id="prodFlow">
            <thead>
            <g:each in="${tableHeadList}" status="j" var="headInstance">
            <th width="125"><g:message code="${headInstance}" default="${headInstance}"/></th>
            </g:each>
            %{--<tr>--}%

                %{--<th width="125">产品名称</th>--}%
                %{--<th width="125">STEP_NO</th>--}%
                %{--<th width="125">流程状态</th>--}%
                %{--<th width="125">STAGE</th>--}%
                %{--<th width="125">STEPID</th>--}%
                %{--<th width="125">STEPINFO</th>--}%
                %{--<th width="125">PPID</th>--}%
                %{--<th width="125">MASK</th>--}%
                %{--<th width="125">EQPTYPE</th>--}%
                %{--<th width="125">当前设备号</th>--}%
                %{--<th width="125">CAPABILITY</th>--}%
                %{--<th width="125">采集项集</th>--}%
                %{--<th width="125">采集项</th>--}%
                %{--<th width="125">LSL</th>--}%
                %{--<th width="125">SL</th>--}%
                %{--<th width="125">USL</th>--}%
                %{--<th width="125">TIMER_TYPE</th>--}%
                %{--<th width="125">QTIME</th>--}%
                %{--<th width="125">TIMER_ID</th>--}%
                %{--<th width="125">HOLD_OWNER</th>--}%
                %{--<th width="125">Rework Procedure</th>--}%
                %{--<th width="125">BASELEADTIME</th>--}%
            %{--</tr>--}%
            </thead>
            <tbody>
            <g:each in="${Report_072List}" status="i" var="dataInstance">
                <tr>
                    <g:each in="${tableHeadList}" status="j" var="headInstance">
                        <td>${dataInstance["${headInstance}"]}</td>
                    </g:each>
                </tr>
            </g:each>
            </tbody>
        </table>
    </g:if>
</div>
</div>
<script type="text/javascript" src="../js/tableMerge.js"></script>

<script type="text/javascript">

    jQuery(document).ready(function () {
        _w_table_rowspan("#prodFlow", 1);
        _w_table_rowspan("#prodFlow", 13);
        _w_table_rowspan_ref("#prodFlow", 13, 14);
        _w_table_rowspan_ref("#prodFlow", 14, 15);
        _w_table_rowspan_ref("#prodFlow", 15, 16);

        _w_table_rowspan_ref("#prodFlow", 1, 2);
        _w_table_rowspan_ref("#prodFlow", 2, 3);
        _w_table_rowspan_ref("#prodFlow", 3, 4);
        _w_table_rowspan_ref("#prodFlow", 4, 5);
        _w_table_rowspan_ref("#prodFlow", 5, 6);
        _w_table_rowspan_ref("#prodFlow", 5, 20);
        _w_table_rowspan_ref("#prodFlow", 5, 21);
        _w_table_rowspan_ref("#prodFlow", 5, 17);
        _w_table_rowspan_ref("#prodFlow", 5, 18);
        _w_table_rowspan_ref("#prodFlow", 5, 19);
        _w_table_rowspan_ref("#prodFlow", 6, 7);
        _w_table_rowspan_ref("#prodFlow", 7, 8);
        _w_table_rowspan_ref("#prodFlow", 8, 9);
        _w_table_rowspan_ref("#prodFlow", 5, 11);
        _w_table_rowspan_ref("#prodFlow", 9, 10);
        _w_table_rowspan_ref("#prodFlow", 9, 12);
        jQuery("td[style = 'display: none;']").remove();
    });

    var submitBtn = document.getElementById("submit1");
    submitBtn.onclick = function (event) {
        var prod = $('#prod').val();
        var process = $('#process').val();
        if (prod && process) {
            alert("产品名称和流程名称只能查一个")
            return false;
        }
    };

    //导出
    $(function () {
        $("#btn").click(function () {
            exportExcelbyWeb(".prodExcel");

        });
    });
</script>
